#include "LinearController.h"

LinearController::LinearController()
//:m_a(this, 0), m_b(this, 0), m_x(this, 0)
{
	//initialise the parameters
	m_a.init(this, 0);
	m_b.init(this, 0);
	m_x.init(this, 0);

	//register the parameters.
	registerDependent(&m_a);
	registerDependent(&m_b);
	registerDependent(&m_x);
}

LinearController::~LinearController(){}


void LinearController::doUpdate()
{
	float res = m_a * m_x + m_b;
	setValue(res);
}